// Conversion functions for
function hexToR(h) {return parseInt((cutHex(h)).substring(0,2),16)}
function hexToG(h) {return parseInt((cutHex(h)).substring(2,4),16)}
function hexToB(h) {return parseInt((cutHex(h)).substring(4,6),16)}
function cutHex(h) {return (h.charAt(0)=="#") ? h.substring(1,7):h}

// Standard web colors lookup list
COLOR['black']={red:0,green:0,blue:0,code:0x000000};
COLOR['gray']={red:115,green:111,blue:110,code:0x736F6E};
COLOR['slategray']={red:101,green:115,blue:131,code:0x657383};
COLOR['lightslategray']={red:109,green:123,blue:141,code:0x6D7B8D};
COLOR['mediumslateblue']={red:94,green:90,blue:128,code:0x5E5A80};
COLOR['midnightblue']={red:21,green:27,blue:84,code:0x151B54};
COLOR['darkslateblue']={red:43,green:56,blue:86,code:0x2B3856};
COLOR['darkslategray']={red:37,green:56,blue:60,code:0x25383C};
COLOR['dimgray']={red:70,green:62,blue:65,code:0x463E41};
COLOR['cornflowerblue']={red:21,green:27,blue:141,code:0x151B8D};
COLOR['royalblue']={red:43,green:96,blue:222,code:0x2B60DE};
COLOR['deepskyblue']={red:59,green:185,blue:255,code:0x3BB9FF};
COLOR['slateblue']={red:53,green:126,blue:199,code:0x357EC7};
COLOR['dodgerblue']={red:21,green:137,blue:255,code:0x1589FF};
COLOR['steelblue']={red:72,green:99,blue:160,code:0x4863A0};
COLOR['violet']={red:141,green:56,blue:201,code:0x8D38C9};
COLOR['mediumpurple']={red:132,green:103,blue:215,code:0x8467D7};
COLOR['lightsteelblue']={red:114,green:143,blue:206,code:0x728FCE};
COLOR['slateblue']={red:115,green:124,blue:161,code:0x737CA1};
COLOR['slateblue']={red:115,green:124,blue:161,code:0x737CA1};
COLOR['violetred']={red:246,green:53,blue:138,code:0xF6358A};
COLOR['deeppink']={red:245,green:40,blue:135,code:0xF52887};
COLOR['mediumvioletred']={red:202,green:34,blue:107,code:0xCA226B};
COLOR['firebrick']={red:128,green:5,blue:23,code:0x800517};
COLOR['maroon']={red:129,green:5,blue:65,code:0x810541};
COLOR['magenta']={red:255,green:0,blue:255,code:0xFF00FF};
COLOR['mediumorchid']={red:176,green:72,blue:181,code:0xB048B5};
COLOR['purple']={red:142,green:53,blue:239,code:0x8E35EF};
COLOR['darkorchid']={red:125,green:27,blue:126,code:0x7D1B7E};
COLOR['darkviolet']={red:132,green:45,blue:206,code:0x842DCE};
COLOR['palevioletred']={red:209,green:101,blue:135,code:0xD16587};
COLOR['plum']={red:185,green:59,blue:143,code:0xB93B8F};
COLOR['thistle']={red:210,green:185,blue:211,code:0xD2B9D3};
COLOR['lavender']={red:227,green:228,blue:250,code:0xE3E4FA};
COLOR['lavenderblush']={red:253,green:238,blue:244,code:0xFDEEF4};
COLOR['lightblue']={red:173,green:223,blue:255,code:0xADDFFF};
COLOR['lightcyan']={red:224,green:255,blue:255,code:0xE0FFFF};
COLOR['cyan']={red:0,green:255,blue:255,code:0x00FFFF};
COLOR['mediumturquoise']={red:72,green:204,blue:205,code:0x48CCCD};
COLOR['turquoise']={red:67,green:198,blue:219,code:0x43C6DB};
COLOR['darkturquoise']={red:59,green:156,blue:156,code:0x3B9C9C};
COLOR['lightseagreen']={red:62,green:169,blue:159,code:0x3EA99F};
COLOR['lightskyblue']={red:130,green:202,blue:250,code:0x82CAFA};
COLOR['skyblue']={red:130,green:202,blue:255,code:0x82CAFF};
COLOR['skyblue']={red:102,green:152,blue:255,code:0x6698FF};
COLOR['lightslateblue']={red:115,green:106,blue:255,code:0x736AFF};
COLOR['mediumaquamarine']={red:52,green:135,blue:129,code:0x348781};
COLOR['mediumseagreen']={red:48,green:103,blue:84,code:0x306754};
COLOR['seagreen']={red:78,green:137,blue:117,code:0x4E8975};
COLOR['darkgreen']={red:37,green:65,blue:23,code:0x254117};
COLOR['forestgreen']={red:78,green:146,blue:88,code:0x4E9258};
COLOR['mediumforestgreen']={red:52,green:114,blue:53,code:0x347235};
COLOR['mediumspringgreen']={red:52,green:128,blue:23,code:0x348017};
COLOR['springgreen']={red:74,green:160,blue:44,code:0x4AA02C};
COLOR['limegreen']={red:65,green:163,blue:23,code:0x41A317};
COLOR['springgreen']={red:74,green:160,blue:44,code:0x4AA02C};
COLOR['darkseagreen']={red:139,green:179,blue:129,code:0x8BB381};
COLOR['yellowgreen']={red:82,green:208,blue:23,code:0x52D017};
COLOR['green']={red:0,green:255,blue:0,code:0x00FF00};
COLOR['lawngreen']={red:135,green:247,blue:23,code:0x87F717};
COLOR['chartreuse']={red:138,green:251,blue:23,code:0x8AFB17};
COLOR['greenyellow']={red:177,green:251,blue:23,code:0xB1FB17};
COLOR['yellow']={red:255,green:255,blue:0,code:0xFFFF00};
COLOR['goldenrod']={red:237,green:218,blue:116,code:0xEDDA74};
COLOR['gold']={red:212,green:160,blue:23,code:0xD4A017};
COLOR['darkgoldenrod']={red:175,green:120,blue:23,code:0xAF7817};
COLOR['khaki']={red:173,green:169,blue:110,code:0xADA96E};
COLOR['darkorange']={red:248,green:128,blue:23,code:0xF88017};
COLOR['sienna']={red:138,green:65,blue:23,code:0x8A4117};
COLOR['chocolate']={red:200,green:90,blue:23,code:0xC85A17};
COLOR['coral']={red:247,green:101,blue:65,code:0xF76541};
COLOR['darksalmon']={red:225,green:139,blue:107,code:0xE18B6B};
COLOR['lightsalmon']={red:249,green:150,blue:107,code:0xF9966B};
COLOR['sandybrown']={red:238,green:154,blue:77,code:0xEE9A4D};
COLOR['hotpink']={red:246,green:96,blue:171,code:0xF660AB};
COLOR['lightcoral']={red:231,green:116,blue:113,code:0xE77471};
COLOR['red']={red:255,green:0,blue:0,code:0xFF0000};
COLOR['pink']={red:250,green:175,blue:190,code:0xFAAFBE};
COLOR['lightpink']={red:250,green:175,blue:186,code:0xFAAFBA};
COLOR['rosybrown']={red:179,green:132,blue:129,code:0xB38481};
COLOR['lightgoldenrod']={red:236,green:216,blue:114,code:0xECD872};
COLOR['lemonchiffon']={red:255,green:248,blue:198,code:0xFFF8C6};
COLOR['lightgoldenrodyellow']={red:250,green:248,blue:204,code:0xFAF8CC};
